rtos queue · Issue #7982 · espressif/arduino

您所在的位置:网站首页 espressif esp32 rtos queue · Issue #7982 · espressif/arduino

rtos queue · Issue #7982 · espressif/arduino

2023-03-26 09:55| 来源: 网络整理| 查看: 265

#include "SPI.h" #include #include "SPIFFS.h" #include "BoardConfig.h" #include "Sensor.h" #include //#include #include //#include "freertos/ringbuf.h"

const char* ssid = "ASUS-38"; //SW1-WIFI6 ASUS-38 vivo Y21 const char* pass = "12345678"; //wireless 12345678 1234567890

const char* mqtt_server = "192.168.50.128"; //broker.emqx.io 192.168.50.128 const char *topic = "DataTopic"; const char *mqtt_username = "emqx"; const char *mqtt_password = "public";

WiFiClient net; MQTTClient client(2000);

#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #define VSPI FSPI #endif

SPIClass SPI1(VSPI); SPIClass SPI2(HSPI);

const char Version[] = "1.0.0"; const char CompileDate[] = DATE " " TIME;

const int TEMP2 = 0x06; const int TEMP1 = 0x07;

long t[9]; double c; //long values[20]; //uint8_t values[20]; uint8_t values[9]; uint8_t DeviceId[2]; double x, y, z; uint32_t i, j, k, m, n; //uint8_t* ui8txLogBuf; uint8_t ui8txLogBuf[2000]; int DryFlag = 1; int FileWriteFlag = 0; int packet_counter = 1;

bool DataReady = false;

#define PACKAGE 900 //72000*3 //180, 1800 #define RingBuf 4500

uint8_t DataBufWrite[2000]; uint8_t DataBufRead[2000];

char s[8];

unsigned long StartTime; unsigned long EndTime;

unsigned long StartTestTime; unsigned long EndTestTime;

int TimeWriteFlag = 0;

const int DEVID_AD = 0x00; const int XDATA3 = 0x08; const int XDATA2 = 0x09; const int XDATA1 = 0x0A; const int YDATA3 = 0x0B; const int YDATA2 = 0x0C; const int YDATA1 = 0x0D; const int ZDATA3 = 0x0E; const int ZDATA2 = 0x0F; const int ZDATA1 = 0x10; const int RANGE = 0x2C; const int POWER_CTL = 0x2D;

// Device values const int RANGE_2G = 0x01; const int RANGE_4G = 0x02; const int RANGE_8G = 0x03; const int MEASURE_MODE = 0x00; //0x06; // Only accelerometer

// Operations const int READ_BYTE = 0x01; const int WRITE_BYTE = 0x00;

// Pins used for the connection with the sensor //const int CHIP_SELECT_PIN = 10;

xQueueHandle xQueue;

uint8_t ascii_trans(uint8_t ui8Code) { if ((ui8Code == 0 || ui8Code > 0) && ui8Code = 10 && ui8Code



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3